#ifndef __VPSS_IMPL_H__
#define __VPSS_IMPL_H__

#include "includes.h"
#include "sys_impl.h"
#ifdef USE_SBUFFER
#include "sbuffer.h"
#endif

#ifdef __cplusplus
extern "C"{
#endif

typedef enum enVPSS_GROUP_STATE_E
{
    VPSS_GRP_STATE_UNINIT,
    VPSS_GRP_STATE_INITED,
    VPSS_GRP_STATE_STOP,
    VPSS_GRP_STATE_START,

    VPSS_GRP_STATE_BUTT,
} VPSS_GROUP_STATE_E;

typedef struct trMPP_VPSS_CHANNEL_S
{
    BOOL bEnable;
    int32_t s32ChnId;

    uint32_t u32Width;
    uint32_t u32Height;
    PIXEL_FORMAT_E enPixelFormat;
    VPSS_FRAME_RATE_S stFrameRate;

    //缓冲区最大帧数
    uint32_t u32Depth;
    //sbuffer可以使用，因为是单写单读
    //struct list_head stBufferList;
#ifdef USE_SBUFFER
    SBUFFER stSBuffer;
#endif
    void *pReversePtr;
} MPP_VPSS_CHANNEL_S;

typedef struct trMPP_VPSS_GROUP_S
{
    MOD_ID_E enModId;
    char strModName[MOD_NAME_MAX_LEN];
    int32_t s32DevId;

    int32_t s32MaxChnNum;
    MPP_VPSS_CHANNEL_S *pstChannels;

    VPSS_GRP_ATTR_S stGrpAttr;
    VPSS_GROUP_STATE_E enState;

    //backup frame
    //void *backup_frame;

    PIN_DATA_S stPinData;
} MPP_VPSS_GROUP_S;

int TR_VPSS_Module_Init();
int TR_VPSS_Module_DeInit();

#ifdef __cplusplus
}
#endif

#endif